layui.define(['jquery','form','laydate','upload','layer','element','functions','uploads'],function(exports){
	var $ = layui.$
	,upload = layui.upload
	,laydate = layui.laydate
	,element = layui.element
	,functions = layui.functions
	,uploads = layui.uploads
	,obj = {
    	init: function(option){
			
			element.render();
			
			functions.uploadCloseButton();
			
			laydate.render({
				elem: '#created',
				type : 'datetime'
			});
			if($('#title1').hasClass("dataSelect")){
				laydate.render({
					elem: '#title1'
				});	
			};
			if($('#title2').hasClass("dataSelect")){
				laydate.render({
					elem: '#title2'
				});	
			};
			if($('#title3').hasClass("dataSelect")){
				laydate.render({
					elem: '#title3'
				});	
			};
			if($('#title4').hasClass("dataSelect")){
				laydate.render({
					elem: '#title4'
				});	
			};
			if($('#title5').hasClass("dataSelect")){
				laydate.render({
					elem: '#title5'
				});	
			};
			if($('#title6').hasClass("dataSelect")){
				laydate.render({
					elem: '#title6'
				});	
			};
			if($('#title7').hasClass("dataSelect")){
				laydate.render({
					elem: '#title7'
				});	
			};
			if($('#title8').hasClass("dataSelect")){
				laydate.render({
					elem: '#title8'
				});	
			};
			if($('#title9').hasClass("dataSelect")){
				laydate.render({
					elem: '#title9'
				});	
			};
			if($('#title10').hasClass("dataSelect")){
				laydate.render({
					elem: '#title10'
				});	
			};
			
			if($('#smallpic').length>0){
				uploads.uploadSingleInit('smallpic');
			};
			if($('#bigpic').length>0){
				uploads.uploadSingleInit('bigpic');
			};
			if($('#upload1').length>0){
				uploads.uploadSingleInit('upload1');
			};
			if($('#upload2').length>0){
				uploads.uploadSingleInit('upload2');
			};
			if($('#upload3').length>0){
				uploads.uploadSingleInit('upload3');
			};
			if($('#upload4').length>0){
				uploads.uploadSingleInit('upload4');
			};
			if($('#upload5').length>0){
				uploads.uploadSingleInit('upload5');
			};
			if($('#multipic').length>0){
				uploads.uploadMutliInit('multipic');
			};
			

		},
		
		
		
		
		
		
	};
	exports('newsAdd', obj);
});   


//内容添加